package net.whzjkj.gateway.core.server;

import java.net.InetSocketAddress;

/**
 * @description: 服务管理
 * @author: Mr.Hu
 * @create: 2018-11-05 16:50
 **/
public interface Server {

    public interface TransmissionProtocol{}

    public enum TRANSMISSION_PROTOCOL implements TransmissionProtocol{
        TCP,UDP;
    }

    TransmissionProtocol getTransmissionProtocol();
    // 启动服务器
    void startServer() throws Exception;

    void startServer(int port) throws Exception;

    void startServer(InetSocketAddress socketAddress) throws Exception;

    // 关闭服务器
    void stopServer() throws Exception;

    InetSocketAddress getSocketAddress();
}
